package com.xiaodu.lombok.entity;

import lombok.Cleanup;
import lombok.SneakyThrows;

import java.io.File;
import java.io.FileInputStream;

/**
 * @author: dutianjie
 * @date: 2021/4/8
 * @version: v1.0.0
 * @description: 描述
 **/
public class CleanupTest {

    @SneakyThrows
    public static void readFile(File file) {
        @Cleanup FileInputStream fileInputStream = new FileInputStream(file);

    }

    public static void readFiles(File file) throws Exception{
        try (FileInputStream fileInputStream = new FileInputStream(file)) {

        }
    }
}
